Skip to content

Fix issue with total_price_cents_usd param in create_order #24

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Mar 30, 2021

Conversation

pcothenet
Copy link
Contributor

@pcothenet pcothenet commented Mar 30, 2021

What

  • Fix the allowed parameters for create_order

Why

SDK Release Checklist

  • Have you added an integration test for the changes?
  • Have you built the library locally and made queries against it successfully?
  • Did you update the changelog?
  • Did you bump the package version?
  • For breaking changes, did you plan for the release of the new SDK versions and deploy the API to production?

@pcothenet pcothenet changed the title Update SDK Fix issue with total_price_cents_usd param in create_order Mar 30, 2021
@pcothenet pcothenet requested a review from biglovisa March 30, 2021 19:39
Comment on lines -55 to +56
self.assertEqual(project.average_price_per_tonne_cents_usd, 0)
self.assertEqual(project.remaining_mass_g, 0)
self.assertGreater(project.average_price_per_tonne_cents_usd, 0)
self.assertGreater(project.remaining_mass_g, 0)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@biglovisa I had to relax this test because we added records to this project on the sandbox.
Generally, I wouldn't want those tests to be too locked in to a specific value.

@pcothenet pcothenet removed the request for review from biglovisa March 30, 2021 19:48
@pcothenet pcothenet requested a review from biglovisa March 30, 2021 19:57
Comment on lines +41 to +45
"""Create an order on price
"""
order = self.api.create_order(total_price_cents_usd=100)

self.assertTrue(order)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test would have caught #23

@pcothenet pcothenet merged commit 574b589 into main Mar 30, 2021
@pcothenet pcothenet deleted the fix-price branch March 30, 2021 20:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Got an unexpected keyword argument 'total_price_cents_usd' to method create_order
2 participants